import 'package:equatable/equatable.dart';

class YookassaApiTimeDto extends Equatable {
  const YookassaApiTimeDto._internal({
    required this.timeString,
  });

  final String timeString;

  @override
  List<Object?> get props {
    return [
      timeString,
    ];
  }

  factory YookassaApiTimeDto.fromString(String s) {
    return YookassaApiTimeDto._internal(
      timeString: s,
    );
  }

  DateTime toEntity() {
    return DateTime.parse(timeString);
  }
}
